package cn.wolfcode.luowowo.serach.template;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Document(indexName = "luowowo_destinationcommend", type = "destinationcommend")
@Getter
@Setter
public class DestinationCommendTemplate implements Serializable {
    public static final String INDEX_NAME = "luowowo_destinationcommend";
    public static final String TYPE_NAME = "destinationcommend";
    @Id
    //@Field 每个文档的字段配置（类型、是否分词、是否存储、分词器 ）
    @Field(store = true, index = true, type = FieldType.Long)
    private Long id;  //推荐目的地id

    @Field(store = true, index = true, type = FieldType.Long)
    private Long destId;      //目的地Id

    @Field(index = true, store = true, type = FieldType.Keyword)
    private String destName;    //目的地名称

    @Field(index=true,analyzer="ik_max_word",store=true,searchAnalyzer="ik_max_word",type = FieldType.Text)
    private String info;//目的地简介

    @Field(store = true, index = true, type = FieldType.Long)
    private Long sceneId;      //景点Id

    @Field(index = true, store = true, type = FieldType.Keyword)
    private String sceneName;    //景点名称

    @Field(store = true, index = true, type = FieldType.Long)
    private Long destThemeId;     //主题id

    @Field(index = true, store = true, type = FieldType.Keyword)
    private String destThemeName;   //主题名

    @Field(index = true, store = true, type = FieldType.Keyword)
    private String destThemeCoverUrl;   //主题封面

    @Field(index = true, store = true, type = FieldType.Integer)
    private Integer destThemeType;   //主题类型

    @Field(index = true, store = true, type = FieldType.Keyword)
    private String coverUrl;     //封面

    @Field(store = true, index = true, type = FieldType.Integer)
    private int month;      // 推荐月份

    @Field(store = true, index = true, type = FieldType.Integer)
    private int days;       // 推荐天数

}